package com.culture.system.service.impl;

import com.culture.common.utils.DateUtils;
import com.culture.system.domain.CultureShop;
import com.culture.system.mapper.CultureShopMapper;
import com.culture.system.service.ICultureShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 店铺管理Service业务层处理
 *
 * @author lidongsheng
 * @date 2025-03-27
 */
@Service
public class CultureShopServiceImpl implements ICultureShopService
{
    @Autowired
    private CultureShopMapper cultureShopMapper;

    /**
     * 查询店铺管理
     *
     * @param id 店铺管理主键
     * @return 店铺管理
     */
    @Override
    public CultureShop selectCultureShopById(Long id)
    {
        return cultureShopMapper.selectCultureShopById(id);
    }

    /**
     * 查询店铺管理列表
     *
     * @param cultureShop 店铺管理
     * @return 店铺管理
     */
    @Override
    public List<CultureShop> selectCultureShopList(CultureShop cultureShop)
    {
        return cultureShopMapper.selectCultureShopList(cultureShop);
    }

    /**
     * 新增店铺管理
     *
     * @param cultureShop 店铺管理
     * @return 结果
     */
    @Override
    public int insertCultureShop(CultureShop cultureShop)
    {
        cultureShop.setCreateTime(DateUtils.getNowDate());
        return cultureShopMapper.insertCultureShop(cultureShop);
    }

    /**
     * 修改店铺管理
     *
     * @param cultureShop 店铺管理
     * @return 结果
     */
    @Override
    public int updateCultureShop(CultureShop cultureShop)
    {
        cultureShop.setUpdateTime(DateUtils.getNowDate());
        return cultureShopMapper.updateCultureShop(cultureShop);
    }

    /**
     * 批量删除店铺管理
     *
     * @param ids 需要删除的店铺管理主键
     * @return 结果
     */
    @Override
    public int deleteCultureShopByIds(Long[] ids)
    {
        return cultureShopMapper.deleteCultureShopByIds(ids);
    }

    /**
     * 删除店铺管理信息
     *
     * @param id 店铺管理主键
     * @return 结果
     */
    @Override
    public int deleteCultureShopById(Long id)
    {
        return cultureShopMapper.deleteCultureShopById(id);
    }
}
